Optimal. Leaf size=22 \[ -\frac{(a \cos (c+d x)+b)^2}{2 a d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0302323, antiderivative size = 29, normalized size of antiderivative = 1.32, number of steps used = 5, number of rules used = 5, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.208, Rules used = {4377, 12, 2638, 2564, 30} \[ \frac{a \sin ^2(c+d x)}{2 d}-\frac{b \cos (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4377
Rule 12
Rule 2638
Rule 2564
Rule 30
Rubi steps
\begin{align*} \int \cos (c+d x) (a \sin (c+d x)+b \tan (c+d x)) \, dx &=a \int \cos (c+d x) \sin (c+d x) \, dx+\int b \sin (c+d x) \, dx\\ &=b \int \sin (c+d x) \, dx+\frac{a \operatorname{Subst}(\int x \, dx,x,\sin (c+d x))}{d}\\ &=-\frac{b \cos (c+d x)}{d}+\frac{a \sin ^2(c+d x)}{2 d}\\ \end{align*}
Mathematica [A] time = 0.0107171, size = 40, normalized size = 1.82 \[ -\frac{a \cos ^2(c+d x)}{2 d}+\frac{b \sin (c) \sin (d x)}{d}-\frac{b \cos (c) \cos (d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.023, size = 26, normalized size = 1.2 \begin{align*} -{\frac{1}{d} \left ({\frac{ \left ( \cos \left ( dx+c \right ) \right ) ^{2}a}{2}}+b\cos \left ( dx+c \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.10742, size = 34, normalized size = 1.55 \begin{align*} -\frac{a \cos \left (d x + c\right )^{2} + 2 \, b \cos \left (d x + c\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.477275, size = 62, normalized size = 2.82 \begin{align*} -\frac{a \cos \left (d x + c\right )^{2} + 2 \, b \cos \left (d x + c\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a \sin{\left (c + d x \right )} + b \tan{\left (c + d x \right )}\right ) \cos{\left (c + d x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.19092, size = 138, normalized size = 6.27 \begin{align*} -\frac{a \cos \left (2 \, d x + 2 \, c\right )}{4 \, d} - \frac{b \tan \left (\frac{1}{2} \, d x\right )^{2} \tan \left (\frac{1}{2} \, c\right )^{2} - b \tan \left (\frac{1}{2} \, d x\right )^{2} - 4 \, b \tan \left (\frac{1}{2} \, d x\right ) \tan \left (\frac{1}{2} \, c\right ) - b \tan \left (\frac{1}{2} \, c\right )^{2} + b}{d \tan \left (\frac{1}{2} \, d x\right )^{2} \tan \left (\frac{1}{2} \, c\right )^{2} + d \tan \left (\frac{1}{2} \, d x\right )^{2} + d \tan \left (\frac{1}{2} \, c\right )^{2} + d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]